﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WFASmartketing.REPORTES
{
    public partial class ReporteRetirosCajaWF : Form
    {
        public ReporteRetirosCajaWF()
        {
            InitializeComponent();
            cbxbanco.DropDownStyle = ComboBoxStyle.DropDownList;
        }

        private void ReporteRetirosCajaWF_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'cajaDS.caja_selectAll' table. You can move, or remove it, as needed.
            this.caja_selectAllTableAdapter.Fill(this.cajaDS.caja_selectAll);
            // TODO: This line of code loads data into the 'ReporteRetirosCajaDS.reporte_retirocaja' table. You can move, or remove it, as needed.
            RECARGARGRID();
        }
        private void RECARGARGRID()
        {
            string cuenta = cbxbanco.Text;
            DateTime ini = dtcini.Value;
            DateTime fin = dtcfin.Value;
            this.reporte_retirocajaTableAdapter.Fill(this.ReporteRetirosCajaDS.reporte_retirocaja, ini, fin, cuenta);
            this.reportViewer1.RefreshReport();
        }
        private void button2_Click(object sender, EventArgs e)
        {
            RECARGARGRID();
        }
    }
}
